package cho114366.basic;

public class Charge {

	public static void main(String[] args) {
		int charge;
		int w1000;
		int w5000;
		int w10000;
		int w50000;
		int rest;
		
		//charge = 876543210;
		charge = 87_654_3210; // JDK, 자릿수 구분"_"
		w50000 = charge/50000;
		rest = (charge-(w50000*50000));
		w10000 = rest/10000;
		rest = rest - (w10000*10000);
		w5000 = rest/5000;
		rest = rest - (w5000*5000);
		w1000 = rest/1000;
		rest = rest -(w1000*1000);
		
		
		System.out.println(charge);
		System.out.println(w50000);
		System.out.println(w10000);
		System.out.println(w5000);
		System.out.println(w1000);
		
		

	}

}

